package tgc.rj.zz.entity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
public class College {

	private Integer id;
	private String collegeName;
	private School school;
	@JsonIgnore
	private List<Bj> bjs = new ArrayList<Bj>();
	
	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getCollegeName() {
		return collegeName;
	}
	public void setCollegeName(String collegeName) {
		this.collegeName = collegeName;
	}
	@ManyToOne
	public School getSchool() {
		return school;
	}
	public void setSchool(School school) {
		this.school = school;
	}
	@OneToMany(cascade=CascadeType.ALL,mappedBy="college")
	public List<Bj> getBjs() {
		return bjs;
	}
	public void setBjs(List<Bj> bjs) {
		this.bjs = bjs;
	}
}
